package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum MsgTypeEnum {
    TEXT("文本"),
    IMG("图片"),
    VIDEO("视频文件"),
    AUDIO("音频文件"),
    OPERATE("操作")
    ;
    public final String type;

    MsgTypeEnum(String type) {

        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (MsgTypeEnum msgTypeEnum : MsgTypeEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", msgTypeEnum.getType());
            map.put("val", msgTypeEnum);
            list.add(map);
        }
        return list;
    }
}
